home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14482 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: dispatch.news.demon.net!demon!pcf.spectratek.co.uk
  2. From: Dean Darlison <dean_darlison@spectratek.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Check if a file exists?
  5. Date: Mon, 15 Apr 1996 07:49:10 -0700
  6. Organization: Spectra-Tek UK Ltd
  7. Message-ID: <317261E6.31D0@spectratek.co.uk>
  8. References: <4kp7pg$upe@news-s01.ny.us.ibm.net>
  9. NNTP-Posting-Host: pcf.spectratek.co.uk
  10. X-NNTP-Posting-Host: pcf.spectratek.co.uk
  11. X-Mailer: Mozilla 2.0 (Win16; I)
  12. MIME-Version: 1.0
  13. Content-Type: text/plain; charset=us-ascii
  14. Content-Transfer-Encoding: 7bit
  15.  
  16. bfilone@ibm.net wrote:
  17. > Is it possible in C to check if a file exists other than checking for a succesful
  18. > fopen? ON a unix machine, I just want to know if a file is there or not, do not
  19. > to read or write anything to it. similar to the -f test in unix? I was hoping for
  20. > something less costly than opening and closing if exists because I am checking
  21. > for the existance of many files during the run of a process
  22. > Did not see any postings that seemed to refer to this.
  23. > Thanks in advance.
  24. > Bruce
  25. > Bruce Filone
  26. > J. W. Pepper & Son
  27. > bfilone@ibm.net
  28.  
  29. try:
  30.  
  31. man access
  32.  
  33. Cheers,
  34.     Dean.
  35.  
  36. -- 
  37. Dean.A.Darlison        
  38. Spectra-Tek UK Ltd
  39. email:    dean_darlison@spectratek.co.uk
  40. Tel:    01653-695551
  41.